<?php
class Custom_Validate_MshSapcode extends Zend_Validate_Abstract
{
	const SAPCODE_MISSING = 'sapcodemissing';
	 
	protected $_messageTemplates = array(
			self::SAPCODE_MISSING => 'Please enter valid SAP Code!'
	);
	 
	public function isValid($value, $context = null)
		{

			$partyNumber = $context['partyNumber'];
			if ($value == 'b') {
				
				$this->_error($partyNumber);
				return false;
			}
	 
			return true;
		}
}

?>